/*
 * @Descripttion: 表格json
 * @version:
 * @Author: qianlishi
 * @Date: 2021-08-29 07:16:10
 * @LastEditors: qianlishi qianlishi@anji-plus.com
 * @LastEditTime: 2023-01-11 13:18:28
 */
export const widgetAdvTable = {
  code: "widget-adv-table",
  type: "text",
  tabName: "文本栏",
  label: "高级表格",
  icon: "iconbiaoge",
  options: {
    setup: [
      {
        type: "el-input-text",
        label: "图层名称",
        name: "layerName",
        required: false,
        placeholder: "",
        value: "表格",
      },
      [
        {
          name: "表格设置",
          list: [
            {
              type: "el-switch",
              label: "显示导出按钮",
              name: "showExportButton",
              required: false,
              placeholder: "",
              value: false,
            },
            {
              type: "el-input-number",
              label: "显示行数",
              name: "vis",
              required: false,
              placeholder: "",
              value: "5",
            },
            {
              type: "el-input-number",
              label: "行高",
              name: "rowHeight",
              required: false,
              placeholder: "",
              value: "50",
            },
            {
              type: "vue-color",
              label: "背景色",
              name: "tableBgColor",
              require: false,
              placeholder: "",
              value: "",
            },
            {
              type: "el-switch",
              label: "边框线",
              name: "isLine",
              required: false,
              placeholder: "",
              value: false,
            },
            {
              type: "el-input-number",
              label: "边框宽度",
              name: "borderWidth",
              required: false,
              placeholder: "",
              value: 1,
            },
            {
              type: "vue-color",
              label: "边框颜色",
              name: "borderColor",
              required: false,
              placeholder: "",
              value: "#fff",
            },
          ],
        },
        {
          name: "表头设置",
          list: [
            {
              type: "el-switch",
              label: "表头显隐",
              name: "isHeader",
              required: false,
              placeholder: "",
              value: true,
            },
            {
              type: "el-select",
              label: "文字位置",
              name: "textAlignHeader",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "center", name: "居中" },
                { code: "left", name: "左对齐" },
                { code: "right", name: "右对齐" },
              ],
              value: "center",
            },
            {
              type: "el-input-number",
              label: "文字字号",
              name: "fontSizeHeader",
              required: false,
              placeholder: "",
              value: "16",
            },
            {
              type: "vue-color",
              label: "文字颜色",
              name: "headColor",
              require: false,
              placeholder: "",
              value: "#fff",
            },
            {
              type: "el-select",
              label: "字体粗细",
              name: "headTextFontWeight",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "normal", name: "正常" },
                { code: "bold", name: "粗体" },
                { code: "bolder", name: "特粗体" },
                { code: "lighter", name: "细体" },
              ],
              value: "normal",
            },
            {
              type: "el-select",
              label: "字体风格",
              name: "headTextFontStyle",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "normal", name: "正常" },
                { code: "italic", name: "italic斜体" },
                { code: "oblique", name: "oblique斜体" },
              ],
              value: "normal",
            },
            {
              type: "el-select",
              label: "字体系列",
              name: "headTextFontFamily",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "sans-serif", name: "sans-serif" },
                { code: "serif", name: "serif" },
                { code: "Arial", name: "Arial" },
                { code: "Courier New", name: "Courier New" },
              ],
              value: "sans-serif",
            },
            {
              type: "vue-color",
              label: "背景色",
              name: "headBackColor",
              require: false,
              placeholder: "",
              value: "#0a73ff",
            },
          ],
        },
        {
          name: "表体设置",
          list: [
            {
              type: "el-select",
              label: "文字位置",
              name: "textAlignBody",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "center", name: "居中" },
                { code: "left", name: "左对齐" },
                { code: "right", name: "右对齐" },
              ],
              value: "center",
            },
            {
              type: "el-input-number",
              label: "文字字号",
              name: "fontSizeBody",
              required: false,
              placeholder: "",
              value: "16",
            },
            {
              type: "vue-color",
              label: "文字颜色",
              name: "bodyColor",
              required: false,
              placeholder: "",
              value: "#fff",
            },
            {
              type: "el-select",
              label: "字体粗细",
              name: "bodyTextFontWeight",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "normal", name: "正常" },
                { code: "bold", name: "粗体" },
                { code: "bolder", name: "特粗体" },
                { code: "lighter", name: "细体" },
              ],
              value: "normal",
            },
            {
              type: "el-select",
              label: "字体风格",
              name: "bodyTextFontStyle",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "normal", name: "正常" },
                { code: "italic", name: "italic斜体" },
                { code: "oblique", name: "oblique斜体" },
              ],
              value: "normal",
            },
            {
              type: "el-select",
              label: "字体系列",
              name: "bodyTextFontFamily",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "sans-serif", name: "sans-serif" },
                { code: "serif", name: "serif" },
                { code: "Arial", name: "Arial" },
                { code: "Courier New", name: "Courier New" },
              ],
              value: "sans-serif",
            },
            {
              type: "vue-color",
              label: "奇行颜色",
              name: "oldColor",
              require: false,
              placeholder: "",
              value: "#0a2732",
            },
            {
              type: "vue-color",
              label: "偶行颜色",
              name: "eventColor",
              required: false,
              placeholder: "",
              value: "#003b51",
            },
          ],
        },
        {
          name: "动画设置",
          list: [
            {
              type: "el-switch",
              label: "开启滚动",
              name: "isRoll",
              required: false,
              placeholder: "",
              value: true,
            },
            {
              type: "el-select",
              label: "动画效果",
              name: "effect",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "top", name: "上滚动" },
                { code: "topLoop", name: "上循环滚动" },
              ],
              value: "topLoop",
            },
            {
              type: "el-input-number",
              label: "滚动间隔(毫秒)",
              name: "interTime",
              required: false,
              placeholder: "",
              value: 2500,
            },
            {
              type: "el-input-number",
              label: "动效时间(毫秒)",
              name: "delayTime",
              required: false,
              placeholder: "",
              value: 500,
            },
            {
              type: "el-input-number",
              label: "滚动个数",
              name: "scroll",
              required: false,
              placeholder: "",
              value: 1,
            },
          ],
        },
        {
          name: "步骤设置",
          list: [
            // ... 现有配置项 ...
            // 添加steps样式配置
            {
              type: "el-switch",
              label: "步骤标题显示",
              name: "stepsShowTitle",
              required: false,
              placeholder: "",
              value: false,
            },
            {
              type: "el-switch",
              label: "步骤描述显示",
              name: "stepsShowDescription",
              required: false,
              placeholder: "",
              value: false,
            },
            {
              type: "el-select",
              label: "步骤显示方向",
              name: "stepsDirection",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "horizontal", name: "水平" },
                { code: "vertical", name: "垂直" },
              ],
              value: "horizontal",
            },
            {
              type: "el-select",
              label: "步骤对齐方式",
              name: "stepsAlign",
              required: false,
              placeholder: "",
              selectOptions: [
                { code: "left", name: "左对齐" },
                { code: "center", name: "居中" },
                { code: "right", name: "右对齐" },
              ],
              value: "center",
            },
            {
              type: "el-input-number",
              label: "步骤间距(px)",
              name: "stepSpace",
              required: false,
              placeholder: "",
              value: 200,
            },
            {
              // 添加alignCenter开关
              type: "el-switch",
              label: "标题居中对齐",
              name: "alignCenter",
              required: false,
              placeholder: "",
              value: false,
            },
            // 添加百分比图相关配置
            {
              type: "el-switch",
              label: "显示百分比图",
              name: "showPercentageIcon",
              required: false,
              placeholder: "",
              value: true,
            },
            {
              type: "el-input-number",
              label: "百分比图大小",
              name: "percentageIconSize",
              required: false,
              placeholder: "",
              value: 50,
            },
            {
              type: "vue-color",
              label: "已完成步骤颜色",
              name: "finishedStepColor",
              required: false,
              placeholder: "",
              value: "#13ce66",
            },
            {
              type: "vue-color",
              label: "当前步骤颜色",
              name: "currentStepColor",
              required: false,
              placeholder: "",
              value: "#409eff",
            },
            {
              type: "vue-color",
              label: "未完成步骤颜色",
              name: "waitingStepColor",
              required: false,
              placeholder: "",
              value: "#c0ccda",
            },
          ],
        },
      ],
      {
        type: "dynamic-add-adv-table",
        label: "",
        name: "dynamicAddAdvTable",
        required: false,
        placeholder: "",
        value: [
          {
            name: "日期",
            key: "date",
            width: "50%",
            renderType: "text",
          },
          {
            name: "姓名",
            key: "name",
            width: "50%",
            renderType: "text",
          },
          {
            name: "地址",
            key: "address",
            width: "200%",
            renderType: "text",
          },
          {
            name: "工资",
            key: "salary",
            width: "100%",
            renderType: "progress",
          },
          {
            name: "步骤",
            key: "steps",
            width: "300%",
            renderType: "steps",
            // 将步骤相关配置移到列定义的顶层，而不是嵌套在stepsConfig中
            stepsShowTitle: true,
            stepsShowDescription: true,
            stepsDirection: "horizontal",
            stepsAlign: "center",
            stepSpace: 120,
            stepsTitlePosition: "left",
            stepsDescriptionPosition: "left",
            // 添加百分比图相关配置
            showPercentageIcon: true,
            percentageIconSize: 30,
            finishedStepColor: "#13ce66",
            currentStepColor: "#409eff",
            waitingStepColor: "#c0ccda",
          },
        ],
      },
    ],
    data: [
      {
        type: "el-radio-group",
        label: "数据类型",
        name: "dataType",
        require: false,
        placeholder: "",
        selectValue: true,
        selectOptions: [
          {
            code: "staticData",
            name: "静态数据",
          },
          {
            code: "dynamicData",
            name: "动态数据",
          },
        ],
        value: "staticData",
      },
      {
        type: "el-input-number",
        label: "刷新时间(毫秒)",
        name: "refreshTime",
        relactiveDom: "dataType",
        relactiveDomValue: "dynamicData",
        value: 30000,
      },
      {
        type: "el-button",
        label: "静态数据",
        name: "staticData",
        required: false,
        placeholder: "",
        relactiveDom: "dataType",
        relactiveDomValue: "staticData",
        value: [
          {
            date: "2016-05-02",
            name: "王小虎",
            address: "上海市普陀区金沙江路 1518 弄0001",
            salary: 30,
            steps: 3,
          },
          {
            date: "2016-05-02",
            name: "王小虎",
            address: "上海市普陀区金沙江路 1518 弄0002",
            salary: 40,
            steps: 4,
          },
          {
            date: "2016-05-02",
            name: "王小虎",
            address: "上海市普陀区金沙江路 1518 弄0003",
            salary: 10000,
            steps: 5,
          },
          {
            date: "2016-05-02",
            name: "王小虎",
            address: "上海市普陀区金沙江路 1518 弄0004",
            salary: 11000,
            steps: 2,
          },
          {
            date: "2016-05-02",
            name: "王小虎",
            address: "上海市普陀区金沙江路 1518 弄0005",
            salary: 12000,
            steps: 4,
          },
          {
            date: "2016-05-02",
            name: "王小虎",
            address: "上海市普陀区金沙江路 1518 弄0006",
            salary: 13000,
            steps: 1,
          },
          {
            date: "2016-05-02",
            name: "王小虎",
            address: "上海市普陀区金沙江路 1518 弄0007",
            salary: 14000,
            steps: 3,
          },
        ],
      },
      {
        type: "dycustComponents",
        label: "",
        name: "dynamicData",
        required: false,
        placeholder: "",
        relactiveDom: "dataType",
        relactiveDomValue: "dynamicData",
        chartType: "widget-table",
        dictKey: "TEXT_PROPERTIES",
        value: "",
      },
    ],
    position: [
      {
        type: "el-input-number",
        label: "左边距",
        name: "left",
        required: false,
        placeholder: "",
        value: 0,
      },
      {
        type: "el-input-number",
        label: "上边距",
        name: "top",
        required: false,
        placeholder: "",
        value: 0,
      },
      {
        type: "el-input-number",
        label: "宽度",
        name: "width",
        required: false,
        placeholder: "该容器在1920px大屏中的宽度",
        value: 600,
      },
      {
        type: "el-input-number",
        label: "高度",
        name: "height",
        required: false,
        placeholder: "该容器在1080px大屏中的高度",
        value: 300,
      },
    ],
  },
};
